import fetch from "../config/fetch";
import { PAGE_SIZE } from "../config/globalConfiguration";

/**
 * 获取外卖首页轮播图
 */

export const getLunBoTu = () =>
  fetch(
    "/api/open/v1/lunbo",
    {
      locatType: 1102
    },
    "POST"
  );


/**
 * 获取外卖商家列表
 */

export const getTakeOutList = parms => {
  let obj = {
    pageNo: 1,
    pageSize: PAGE_SIZE,
    keyWord: "",
    areaId: "",
    longitude: "",
    latitude: "",
    activityId: "",
    twoTypeId: "",
    threeTypeId: "",
    sortType: ""
  };
  parms = Object.assign(obj, parms);
  return fetch("/api/wm/shop/v1/list", parms, "POST");
};

//获取商家分类列表

export const getShopClass = () =>
  fetch(
    "/api/open/v1/shop_type",
    {
      wm: true
    },
    "POST"
  );